package org.linlinjava.litemall.admin.web;

import org.linlinjava.litemall.core.util.ResponseUtil;
import org.linlinjava.litemall.db.service.LitemallArrivalReminderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author piao
 * @Date 2021/03/19
 */
@RestController
@RequestMapping("/admin/arrivalReminder")
public class AdminArrivalReminderController {
    @Autowired
    private LitemallArrivalReminderService arrivalReminderService;

    @GetMapping("/list")
    public Object listAll(@RequestParam(required = false) String bookName,
                          @RequestParam(defaultValue = "1") Integer page,
                          @RequestParam(defaultValue = "10") Integer limit) {
        return ResponseUtil.okList(arrivalReminderService.listAll(bookName, page, limit));

    }
}
